Configure gradle to check code samples#53
Merged
JuliaEvseeva merged 16 commits intomigration-to-hugofrom Dec 17, 2025
Merged
Conversation
Also add the possibility to build or run the project.
armiol
requested changes
Dec 16, 2025
Contributor
armiol
left a comment
There was a problem hiding this comment.
@JuliaEvseeva please see my comments.
_code/EMBEDDING.md
Outdated
| 5. Execute: `./embed-code -config-path="config-of-your-choice.yml" -mode="embed"`. | ||
| 1. Make sure the project you're going to add has a top-level `buildAll` Gradle task. | ||
|
|
||
| See the [build of the Hello Example](https://github.com/spine-examples/hello/blob/master/build.gradle) |
Contributor
There was a problem hiding this comment.
Let's say this:
"See the build script of ... "
_code/EMBEDDING.md
Outdated
| 1. Make sure the project you're going to add has a top-level `buildAll` Gradle task. | ||
|
|
||
| See the [build of the Hello Example](https://github.com/spine-examples/hello/blob/master/build.gradle) | ||
| for the declaration of such a task. This task must present in both single- |
_code/EMBEDDING.md
Outdated
| and multi-module Gradle example projects that are going to be used for | ||
| embedding into this site. | ||
|
|
||
| If you are interested in the details on why the `buildAll` task is needed, |
Contributor
There was a problem hiding this comment.
Let's simplify this whole paragraph.
"See the declaration of buildAll task for more details."
|
|
||
| ### Adding a new small piece | ||
|
|
||
| 1. Add the code under `_code/samples/src` directory. |
Contributor
There was a problem hiding this comment.
Let's discuss this vocally again.
I can see this folder as a Gradle project here, but not in this repo.
_script/check-samples
Outdated
| cd _code | ||
|
|
||
| # Check code samples. | ||
| ./embed-code-macos -config-path="config-v1.yml" -mode="check" |
Contributor
There was a problem hiding this comment.
Let's mention in the README.md that there is a prerequisite for the scripting part to work: having an ARM-based Mac.
5cd9804 to
d74bbc0
Compare
armiol
requested changes
Dec 16, 2025
Contributor
armiol
left a comment
There was a problem hiding this comment.
@JuliaEvseeva please see my comment.
armiol
approved these changes
Dec 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR configures
gradlescripts that allows:runSite– builds and runs the site locally.buildSite– builds the site without starting the server.embedCode– embeds the code samples into pages of the site.checkSamples– verifies that the source code samples embedded into the pages are up-to-date.buildAll– builds all included projects via depending on the top-level "buildAll" tasks declared in these projects.Other changes
_code/samplesproject for future using.